var mongoose = require("mongoose");
var dbconn = require("./mongoose");

let goodsListSchema=new mongoose.Schema({
  img1:{type:String},
  txt1:{type:String},
  time:{type:String},
  img2:{type:String},
  img3:{type:String},
  txt2:{type:String},
  txt3:{type:String},
  price:{type:String},
  txt4:{type:String}
});
let goodsModel=dbconn.model("showlists",goodsListSchema);

module.exports ={
  "findGoods":function(cb){
    goodsModel.find({},function(err,data){
      if(err){
        console.log("查询失败");
      }else{
        cb(data);
      }
    })
  }

}
